import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 */

class Pocket{
    private int red;
    private int yellow;
    private int green;

    private int count;

    Pocket() {
        System.out.println("三色球问题求解：");
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入红球的数量为：");
        this.red = scanner.nextInt();
        System.out.print("请输入黄球的数量为：");
        this.yellow = scanner.nextInt();
        System.out.print("请输入绿球的数量为：");
        this.green = scanner.nextInt();
        System.out.print("请输入取出球的数量为：");
        this.count = scanner.nextInt();
    }

    public int getRed() {
        return red;
    }

    public int getYellow() {
        return yellow;
    }

    public int getGreen() {
        return green;
    }

    public int getCount() {
        return count;
    }
}

class Test4 {
    static int x = 50;
    static int y =200 ;
    public static void method( ) {
        System.out.println(x+y);
    }
    public static void main(String[ ] args) {
        Test4.method( );
    }
}


public class Test {
    public static int recursion(int count,int disparity) {
        if(count == 1) {
            return 10;
        }
        return recursion(count - 1,disparity) + disparity;
    }

    public static void main(String[] args) {
        int peopleCount = 5;
        int fiveYear = recursion(peopleCount,2);
        System.out.println(fiveYear);
    }

    public static void main2(String[] args) {
        int count = 0;
        for (int i = 100; i <= 200; i++) {
            int bit = i % 10;
            int ten = i / 10 % 10;
            int hundred = i / 100;
            if(bit != ten && bit != hundred && ten != hundred) {
                System.out.print(i + " ");
                count++;
            }
            if(count % 20 == 0 && count != 0) {
                System.out.println();
            }
        }
    }

    public static void main1(String[] args) {
        Pocket pocket = new Pocket();
        System.out.println("总共有如下几种可能！");
        System.out.printf("%4s%4s%4s\n","红球","黄球","绿球");
        for(int i = 0; i <= pocket.getRed() && i <= pocket.getCount(); i++) {
            for (int j = 0; j <= pocket.getYellow() && j <= pocket.getCount() - i; j++) {
                if(pocket.getGreen() >= pocket.getCount() - i - j) {
                    System.out.printf("%4d %4d %4d\n",i,j,pocket.getCount() - i - j);
                }
            }
        }
    }
}
